using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace XiaoMan.Model.Models.Mapping
{
    public class Forum_Topic_BackMap : EntityTypeConfiguration<Forum_Topic_Back>
    {
        public Forum_Topic_BackMap()
        {
            // Primary Key
            this.HasKey(t => t.TopicBackID);

            // Properties
            this.Property(t => t.BackContent)
                .HasMaxLength(150);

            this.Property(t => t.BackPic)
                .HasMaxLength(25);

            this.Property(t => t.UserNikeName)
                .HasMaxLength(50);

            this.Property(t => t.BackToUserNikeName)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("Forum_Topic_Back");
            this.Property(t => t.TopicBackID).HasColumnName("TopicBackID");
            this.Property(t => t.TopicID).HasColumnName("TopicID");
            this.Property(t => t.BackContent).HasColumnName("BackContent");
            this.Property(t => t.BackPic).HasColumnName("BackPic");
            this.Property(t => t.UserID).HasColumnName("UserID");
            this.Property(t => t.UserNikeName).HasColumnName("UserNikeName");
            this.Property(t => t.BackToUserID).HasColumnName("BackToUserID");
            this.Property(t => t.BackToUserNikeName).HasColumnName("BackToUserNikeName");
            this.Property(t => t.ParentID).HasColumnName("ParentID");
            this.Property(t => t.UpVoteCount).HasColumnName("UpVoteCount");
            this.Property(t => t.IsDelFlag).HasColumnName("IsDelFlag");
            this.Property(t => t.IsAudit).HasColumnName("IsAudit");
            this.Property(t => t.CreateTime).HasColumnName("CreateTime");
        }
    }
}
